﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace Ccit.OA.Group
{
    public partial class group_personal_list : Ccit.Utils.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                _hidGroupId.Value = (Request.QueryString["GroupId"] != null) ? Request.QueryString["GroupId"].ToString() : "";
            }
            InitBinde();
        }
        /// <summary>
        /// 数据绑定
        /// </summary>
        private void InitBinde()
        {
            if (_hidGroupId.Value != "")
            {
                GroupBLL Bll = new GroupBLL();
                DataSet dSet = Bll.GetGroupDetailMes(_hidGroupId.Value);
                if (dSet.Tables[0].Rows.Count > 0)
                {
                    string vUserId = "";
                    for (int i = 0; i < dSet.Tables[0].Rows.Count; i++)
                    {
                        vUserId += (vUserId == "") ? dSet.Tables[0].Rows[i][0].ToString() : "," + dSet.Tables[0].Rows[i][0].ToString();
                    }
                    _hidSelUserId.Value = vUserId;
                        dgMain.DataSource = dSet;
                }
                else
                {
                    dgMain.DataSource = null;
                }
                dgMain.DataBind();
            }
        }
    }
}
